
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<%
	String path = request.getContextPath();
	// 获得项目完全路径:
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<head>
<base href="<%=basePath%>">

<title>云平台——开发者账号服务</title>
<meta http-equiv="pragma" content="no-cache">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="keywords" content="万达,服务,账号">
<meta http-equiv="description" content="开发者账号">
<meta http-equiv="cache-control" content="no-cache">
<link rel="shortcut icon" href="resources/images/logo/logo64.png"/>
<jsp:include page="pages/outerfile.jsp" flush="true" />

</head>
<body>
	<div id="manage_container">
		<div class="left_menu">
			<div class="common_menu" style="display: block">
				<div class="menuStyle">
					<div id="title" style="cursor: pointer;">
						<img src="resources/images/home/logo.png"
							style="margin-top: 28px; margin-right: auto" />
					</div>
					<div class="user_role_A">
						<ul>
							<li class="super_menu current-list" data-value="appManage"
								onclick="loadMainPage('right_loadpages','pages/appManage/appManage.jsp')">
								<span class="colorLi color-li-a"></span> <a href="javascript:;"
								class="spanA"><img src="resources/images/home/icon_projectAudit.png"
									width="24" height="24" alt="" /><span>应用管理</span></a>
							</li>
							<li class="super_menu" data-value="userManage"
								onclick="loadMainPage('right_loadpages','pages/userManage/userManage.jsp')">
								<span class="colorLi"></span> <a href="javascript:;"
								class="spanA"><img src="resources/images/home/icon_appDeploy.png"
									width="24" height="24" alt="" /><span>用户管理</span></a>
							</li>
							<li class="super_menu" data-value="configurationManage"
								onclick="loadMainPage('right_loadpages','pages/configurationManage/configurationManage.jsp')">
								<span class="colorLi"></span> <a href="javascript:;"
								class="spanA"><img src="resources/images/home/icon_appAudit.png"
									width="24" height="24" alt="" /><span>配置管理</span></a>
							</li>
							<li class="super_menu" data-value="fileManage"
								onclick="loadMainPage('right_loadpages','pages/fileManage/fileManage.jsp')">
								<span class="colorLi"></span> <a href="javascript:;"
								class="spanA"><img src="resources/images/home/icon_configuration.png"
									width="24" height="24" alt="" /><span>文件管理</span></a>
							</li>
						</ul>
					</div>
				</div>
				<div class="system">
					<div class="user">
						<div id="currentUserInfo">
							<div id="currentUserImg">
					       		<c:choose>  
									<c:when test="${datas.userIconPath!=''}"> 
										<img width="30" onerror="this.src='<%=basePath%>resources/images/head/user-icon.png'" src="<%=basePath%>image/${datas.userIconPath}">
				  					</c:when> 
									<c:otherwise>
										<img width="30" onerror="this.src='<%=basePath%>resources/images/head/user-icon.png'" src="<%=basePath%>resources/images/head/user-icon.png">
									</c:otherwise>  
								 </c:choose>
							</div>
							<div id="currentUser">${datas.userName}</div>
							<div id="currentUserClick">
								<img width="8" src="resources/images/head/user-headClick.png">
							</div>
						</div>
						<ul style="display: none">
							<li data-value="userInfo"
								onclick="loadMainPage('right_loadpages','pages/system_manage/userInfo.jsp')">个人资料</li>
							<li data-value="password"
								onclick="loadMainPage('right_loadpages','pages/system_manage/password.jsp')">修改密码</li>
							<li style="border-top: 1px solid #536578; margin-top: 10px;"><a
								href="http://cloud.wondersgroup.com/developer/wiki/cwc/help/doc"
								target="_blank" style="color: #FFFFFF">帮助</a></li>
							<li><a href="pages/about.jsp" style="color: #FFFFFF">关于</a></li>
							<li onclick="userLogout()"
								style="border-top: 1px solid #536578; margin-top: 10px;">退出</li>
						</ul>
					</div>
				</div>
			</div>

			<div class="zoom_menu" style="display: none">
				<div id="zoom_title" style="cursor: pointer;">
					<img width="50" src="resources/images/head/zoom-logo.png">
				</div>
				<div class="user_role_A">
					<ul>
						<li class="menu current-list" data-value="appManage"
							onclick="loadMainPage('right_loadpages','pages/appManage/appManage.jsp')"
							title="应用管理"><span class="colorLi color-li-a"></span><a
							href="javascript:;" class="zoom_spanA"> <img
								src="resources/images/home/icon_projectAudit.png" /><span
								style="display: none">应用管理</span></a></li>
						<li class="menu" data-value="userManage"
							onclick="loadMainPage('right_loadpages','pages/userManage/userManage.jsp')"
							title="用户管理"><span class="colorLi"></span><a
							href="javascript:;" class="zoom_spanA"> <img
								src="resources/images/home/icon_appDeploy.png" /><span
								style="display: none">用户管理</span></a></li>
						<li class="menu" data-value="configurationManage"
							onclick="loadMainPage('right_loadpages','pages/configurationManage/configurationManage.jsp')"
							title="配置管理"><span class="colorLi"></span><a
							href="javascript:;" class="zoom_spanA"> <img
								src="resources/images/home/icon_appAudit.png" /><span
								style="display: none">配置管理</span></a></li>
						<li class="menu" data-value="fileManage"
							onclick="loadMainPage('right_loadpages','pages/fileManage/fileManage.jsp')"
							title="文件管理"><span class="colorLi"></span><a
							href="javascript:;" class="zoom_spanA"> <img
								src="resources/images/home/icon_configuration.png" /><span
								style="display: none">文件管理</span></a></li>
					</ul>
				</div>
				<div class="system">
					<div class="user">
						<div id="currentUserInfo">
							<div id="currentUserImg">
								<c:choose>  
									<c:when test="${datas.userIconPath!=''}"> 
										<img width="30" onerror="this.src='<%=basePath%>resources/images/head/user-icon.png'" src="<%=basePath%>image/${datas.userIconPath}">
				  					</c:when> 
									<c:otherwise>
										<img width="30" onerror="this.src='<%=basePath%>resources/images/head/user-icon.png'" src="<%=basePath%>resources/images/head/user-icon.png">
									</c:otherwise>  
								 </c:choose>
							</div>
						</div>
						<ul style="display: none">
							<li data-value="userInfo"
								onclick="loadMainPage('right_loadpages','pages/system_manage/userInfo.jsp')">个人资料</li>
							<li data-value="password"
								onclick="loadMainPage('right_loadpages','pages/system_manage/password.jsp')">修改密码</li>
							<li style="border-top: 1px solid #536578; margin-top: 10px;"><a
								href="http://cloud.wondersgroup.com/developer/wiki/cwc/help/doc"
								target="_blank" style="color: #FFFFFF">帮助</a></li>
							<li><a href="pages/about.jsp" style="color: #FFFFFF">关于</a></li>
							<li onclick="userLogout()"
								style="border-top: 1px solid #536578; margin-top: 10px;">退出</li>
						</ul>
					</div>
				</div>
			</div>
		</div>

		<div id="hideOrShow"></div>
		<div id="right_container">
			<div id="right_loadpages"></div>
		</div>
		<div id="alertDialog" class="win_dialog"></div>
	</div>
	<script type="text/javascript">
		var currMenuSelect = "appManage";
		function clearStyle() {
			$("li.super_menu").removeClass("current-list");
			$("li.menu").removeClass("current-list");
			$("li.colorLi").removeClass("color-li-a");
		}
		function selectLi(value) {
			$("li[data-value=" + value + "]").addClass("current-list")
					.siblings().removeClass("current-list");
			$(".menuStyle li .colorLi").removeClass("color-li-a");
			$(".menuStyle li a").removeClass("fillA").addClass("spanA");
			$(".menuStyle li[data-value=" + value + "]").find(".colorLi")
					.addClass("color-li-a");
			$(".menuStyle li[data-value=" + value + "]").find("a").removeClass(
					"spanA").addClass("fillA");
		}
		$(function() {
			var url=sessionStorage.getItem("loadJsp"); 
			/* $.getJSON("user/getAuthority", function(r) {
				if (r.result.roleId == ROLEID_A) { */
					selectLi("appManage");
					if(url==null){
						url="pages/appManage/appManage.jsp";
					}else{
						var dataValue=url.split("/");
						var urlJsp=dataValue[dataValue.length-1].replace(".jsp","");
						selectLi(urlJsp);
					}
					loadMainPage('right_loadpages',url);
			/* 	}
			}); */
			$(".menuStyle li").click(
					function() {
						//sessionStorage.clear();
						clearSession();
						currMenuSelect = $(this).attr("data-value");
						$(this).addClass("current-list").siblings()
								.removeClass("current-list");
						$(".menuStyle li .colorLi").removeClass("color-li-a");
						$(".menuStyle li a").removeClass("fillA").addClass(
								"spanA");
						$(this).find(".colorLi").addClass("color-li-a");
						$(this).find("a").removeClass("spanA")
								.addClass("fillA");
						$("#location_title").html($(this).find("span").html());
					});
			$(".zoom_menu li").click(
					function() {
						//sessionStorage.clear();
						clearSession();
						currMenuSelect = $(this).attr("data-value");
						$(this).addClass("current-list").siblings()
								.removeClass("current-list");
						$(".zoom_menu li .colorLi").removeClass("color-li-a");
						$(".zoom_menu li a").removeClass("zoom_fillA")
								.addClass("zoom_spanA");
						$(this).find(".colorLi").addClass("color-li-a");
						$(this).find("a").removeClass("zoom_spanA").addClass(
								"zoom_fillA");
						$("#location_title").html($(this).find("span").html());
					});
			$(".user li").click(
					function() {
						currMenuSelect = $(this).attr("data-value");
						$(this).addClass("current-list").siblings()
								.removeClass("current-list");
						$("#location_title").html($(this).find("span").html());
					});
			$("#title").click(
					function() {
						clearStyle();
						$(".common_menu").hide();
						$(".left_menu").width(70);
						$("#right_container").width(
								document.body.clientWidth - 73);
						$(".zoom_menu li a").removeClass("fillA").removeClass(
								"zoom_fillA").addClass("zoom_spanA");
						$(".zoom_menu").find(
								"li[data-value=" + currMenuSelect + "]")
								.addClass("current-list").siblings()
								.removeClass("current-list");
						$(".zoom_menu").find(
								"li[data-value=" + currMenuSelect + "]")
								.siblings().find(".colorLi").removeClass(
										"color-li-a");
						$(".zoom_menu").find(
								"li[data-value=" + currMenuSelect + "]").find(
								".colorLi").addClass("color-li-a");
						$(".zoom_menu").find(
								"li[data-value=" + currMenuSelect + "]").find(
								"a").removeClass("zoom_spanA").addClass(
								"zoom_fillA");
						$(".zoom_menu").show();
						//查看详情：表格内容宽度自适应
						changeGridWidth();
					});
			$("#zoom_title").click(
					function() {
						clearStyle();
						$(".zoom_menu").hide();
						$(".left_menu").width(250);
						$("#right_container").width(
								document.body.clientWidth - 253);
						$(".common_menu li a").removeClass("zoom_fillA")
								.removeClass("fillA").addClass("spanA");
						$(".common_menu").find(
								"li[data-value=" + currMenuSelect + "]")
								.addClass("current-list").siblings()
								.removeClass("current-list");
						$(".common_menu").find(
								"li[data-value=" + currMenuSelect + "]")
								.siblings().find(".colorLi").removeClass(
										"color-li-a");
						$(".common_menu").find(
								"li[data-value=" + currMenuSelect + "]").find(
								".colorLi").addClass("color-li-a");
						$(".common_menu").find(
								"li[data-value=" + currMenuSelect + "]").find(
								"a").removeClass("spanA").addClass("fillA");
						$(".common_menu").show();
						//查看详情：表格内容宽度自适应
						changeGridWidth();
					});
			$(".system .user").hover(function() {
				$(".user ul").show();
			}, function() {
				$(".user ul").hide();
			});
		});
		function getUserInfo() {
			$.get("api/users/userinfo", function(msg) {
				if (msg.code == 1) {
					var data = msg.result;
					if (data.userIconPath == null || data.userIconPath == "") {
						$("#currentUserImg img").attr("src",
								"resources/images/head/user-icon.png");
					} else {
						$("#currentUserImg img").attr(
								"src",
								"${pageContext.request.contextPath}/image/"
										+ data.userIconPath);
					}
					$("#currentUser").html(
							"<strong>" + data.userName + "</strong>");
				} else {
					createAlertWindow(msg.msg);
				}
			});
		}
		function userLogout() {
			$.get("user/logout",function(msg) {
				if (msg.code == 1) {
					sessionStorage.clear();
					window.location.href = "${pageContext.request.contextPath}/login.jsp";
				} else {
					createAlertWindow("退出失败");
				}
			});
		}
	</script>
</body>
</html>
